package com.hfjava.question.service.impl;


import com.hfjava.question.interfaces.ClassService;
import com.hfjava.question.mapper.ClassMapper;
import com.hfjava.question.pojo.Class;

import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

//标注业务组件
@org.springframework.stereotype.Service
@Transactional(rollbackFor = {Exception.class})
//在zk服务注册中心上暴露服务接口
@com.alibaba.dubbo.config.annotation.Service(interfaceClass = ClassService.class,version = "1.0.0")
public class ClassServiceImpl implements ClassService {

    @Resource
    private ClassMapper classMapper;

    public List<Class> findAllClass() {
        return classMapper.selectAllClass();
    }

    public Class findClassById(Integer classId) {
        return classMapper.selectClassById(classId);
    }
}
